package com.itheima.boot;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.filter.OrderedCharacterEncodingFilter;
import org.springframework.context.annotation.Bean;
import org.springframework.web.filter.CharacterEncodingFilter;

@SpringBootApplication
//@SpringBootConfiguration  配置类
// 默认情况下 @ComponentScan 扫描包的范围 当前类所有的注解的包， 包含子包的所有带注解的类
public class BootConfigApplication {

	public static void main(String[] args) {
		SpringApplication.run(BootConfigApplication.class, args);
	}

	@Bean
	public CharacterEncodingFilter characterEncodingFilter() {
		CharacterEncodingFilter filter = new OrderedCharacterEncodingFilter();
		filter.setEncoding("GBK");
		System.out.println("hf8.... commit....");
		return filter;
	}
}
